// pages/new/new.js
Page({
  data: {
    //选择咖啡的框框
    thisImgIndex: 0,
    //选择咖啡的渲染图
    arrImg: [
      "/images/oder/1.jpg",
      "/images/oder/2.jpg",
      "/images/oder/3.jpg",
      "/images/oder/4.jpg",
      "/images/oder/5.jpg",
      "/images/oder/6.jpg",
      "/images/oder/7.jpg",
      "/images/oder/8.jpg",
      "/images/oder/9.jpg",
    ],
    // 选择口味的数组
    arrText: [
      '原味',
      '加冰',
      '浓烈',
      '香甜',
      '加奶',
      '狂野',
    ],
    // 选择口味
    thischoose:0,
    // 当前选中的图片
    currentImage:"/images/oder/1.jpg"
  },
  // 选择咖啡的框框
  chooseCoffee(e){
    let imgindex = e.currentTarget.dataset.index
    this.setData({
      currentImage:this.data.arrImg[imgindex],
      thisImgIndex:e.currentTarget.dataset.index
    })
  },
  // 选择口味的框框
  chooseTaste(e){
    this.setData({
      thischoose:e.currentTarget.dataset.index
    })
  }
})